#include<stdio.h>
#include<unistd.h>
int main()
{
  pid_t id = fork();
  if(id < 0)
  {
    printf("子进程创建失败\n");
    return 1;
  }
  else if(id == 0)
  {
    printf("我是子进程:%d\n",getpid());
  }
  else
  {
    printf("我是父进程:%d\n",getpid());
  }
  return 0;
}
